﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SearchFlight4.aspx.cs" Inherits="SearchFlight4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="CSS/DisplayFlight.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table align="center" 
            style="width: 100%; height: 50px; border-color: #3399FF; background-color: #66CCFF;" 
            cellpadding="5">
            <tr align="center" valign="middle">
                <td width="80px">
                    <asp:HyperLink ID="HyperLink7" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight.aspx">1.Search</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink8" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight1.aspx">2.Confirm<br />Request</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink9" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight2.aspx">3.Choose<br />Route</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink10" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight3.aspx">4.Choose<br />Flight</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink12" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight4.aspx">5.Choose<br />Seat Class</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink11" runat="server" Font-Bold="True" ForeColor="#666666">6.Passengers Detail</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink13" runat="server" Font-Bold="True" ForeColor="#666666">7.Payment</asp:HyperLink>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <h2 align="center">
        Choose your Price.</h2>
    <b>You want to buy or book it ?</b>
    <br />
    <br />
    <p align="center" style="margin: 5px; font-weight: bolder; font-size: medium;">
        ------------------ Depart Flight ------------------</p>
    <br />
    <div align="left" style="width: 100%; clear: both;">
        Do you want to :
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem Value="Buy">Buy it!</asp:ListItem>
            <asp:ListItem Value="Book">Book it!</asp:ListItem>
        </asp:DropDownList>
        <asp:Label ID="lblNoBook1" runat="server" ForeColor="Red" Text="You can't book this flight"
            Visible="False"></asp:Label>
        <br />
        <br />
        <table class="style1" align="center" border="1">
            <tr>
                <td align="center" class="style3">
                    From
                </td>
                <td align="center" class="style3">
                    To
                </td>
                <td align="center" class="style3">
                    Bussiness Class Seat
                </td>
                <td align="center" class="style3">
                    First Class Seat
                </td>
                <td align="center" class="style3">
                    Club Class Seat
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Label ID="lblDepartFrom" runat="server"></asp:Label>
                </td>
                <td align="center">
                    <asp:Label ID="lblDepartTo" runat="server"></asp:Label>
                </td>
                <td align="center">
                    <asp:RadioButton ID="rbDepartBuss" runat="server" GroupName="Depart" ValidationGroup="Confirm" />
                </td>
                <td align="center">
                    <asp:RadioButton ID="rbDepartFirst" runat="server" GroupName="Depart" ValidationGroup="Confirm" />
                </td>
                <td align="center">
                    <asp:RadioButton ID="rbDepartClub" runat="server" GroupName="Depart" ValidationGroup="Confirm" />
                </td>
            </tr>
        </table>
        <asp:Label ID="lblDepartStop" runat="server"></asp:Label>
        &nbsp;&nbsp;&nbsp;
        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="View Detail" OnCommand="LinkButton3_Command">View Detail</asp:LinkButton>
        <br />
        <div style="width: 100%">
            <asp:PlaceHolder ID="phDepartDetail" runat="server" Visible="False">
                <asp:DataList ID="dlDepartDetail" runat="server" HorizontalAlign="Right" Width="98%"
                    CellPadding="4" ForeColor="#333333">
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <AlternatingItemStyle BackColor="White" />
                    <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <SeparatorTemplate>
                        <br />
                    </SeparatorTemplate>
                    <HeaderTemplate>
                        <table border="1" width="100%">
                            <tr>
                                <td align="center" class="style5">
                                    Flight ID
                                </td>
                                <td align="center" class="style3">
                                    From
                                </td>
                                <td align="center" class="style3">
                                    To
                                </td>
                                <td align="center" class="style3">
                                    Air Plane
                                </td>
                                <td align="center" class="style6">
                                    Depart Time
                                </td>
                                <td align="center" class="style4">
                                    Fly hour
                                </td>
                                <td align="center" class="style3">
                                    Allow smoking
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <ItemTemplate>
                        <table width="100%" border="1">
                            <tr>
                                <td align="center" class="style5">
                                    <asp:Label ID="FID" runat="server" Text='<%# Eval("FlightID") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="lblFlightOrigin" runat="server" Text='<%# Eval("Route.Origin.Name") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="lblFlightDes" runat="server" Text='<%# Eval("Route.Destination.Name") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="AirPlane" runat="server" Text='<%# Eval("Plane.Name") %>' />
                                </td>
                                <td align="center" class="style6">
                                    <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                                    <br />
                                    <asp:Label ID="GMT" runat="server" Text='<%# Eval("Route.Origin.GMT", "(GMT {0})") %>' />
                                </td>
                                <td align="center" class="style4">
                                    <asp:Label ID="FlyHour" runat="server" Text='<%# Eval("FlyHour") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:RadioButton ID="RadioButton1" runat="server" Checked='<%# Eval("Smoking") %>'
                                        Text="Allow Smoking" Enabled="False" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available Bussiness Class Seat:
                                    <asp:Label ID="AvailBussSeatLabel0" runat="server" Text='<%# Eval("AvailBussSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="BussPriceLabel0" runat="server" Text='<%# Eval("BussPrice") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available First Class Seat:
                                    <asp:Label ID="AvailFirstSeatLabel" runat="server" Text='<%# Eval("AvailFirstSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="FirstPriceLabel" runat="server" Text='<%# Eval("FirstPrice","{0}USD") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available Club Class Seat:
                                    <asp:Label ID="AvailClubSeatLabel" runat="server" Text='<%# Eval("AvailClubSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="ClubPriceLabel" runat="server" Text='<%# Eval("ClubPrice", "{0}USD") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    Children Discount:
                                    <asp:Label ID="ChildDiscountLabel" runat="server" Text='<%# Eval("ChildDiscount","{0}%") %>' />
                                    <td colspan="3">
                                        Senior Discount:
                                        <asp:Label ID="SeniorDiscountLabel" runat="server" Text='<%# Eval("SeniorDiscount","{0}%") %>' />
                                    </td>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </asp:PlaceHolder>
        </div>
    </div>
    <br />
    <br />
    <br />
    <div style="width: 100%; clear: both;">
        <asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible="False">
            <div align="center" style="margin: 10px auto 10px auto; font-weight: bolder; font-size: medium;">
                ------------------ Return Flight ------------------</div>
            <br />
            <div align="left">
                Do you want to :
                <asp:DropDownList ID="DropDownList2" runat="server">
                    <asp:ListItem Value="Buy">Buy it!</asp:ListItem>
                    <asp:ListItem Value="Book">Book it!</asp:ListItem>
                </asp:DropDownList>
                <asp:Label ID="lblNoBook2" runat="server" ForeColor="Red" Text="You can't book this flight"
                    Visible="False"></asp:Label>
                <br />
                <br />
                <table class="style1" align="center" border="1">
                    <tr>
                        <td align="center" class="style3">
                            From
                        </td>
                        <td align="center" class="style3">
                            To
                        </td>
                        <td align="center" class="style3">
                            Bussiness Class Seat
                        </td>
                        <td align="center" class="style3">
                            First Class Seat
                        </td>
                        <td align="center" class="style3">
                            Club Class Seat
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblReturnFrom" runat="server"></asp:Label>
                        </td>
                        <td align="center">
                            <asp:Label ID="lblReturnTo" runat="server"></asp:Label>
                        </td>
                        <td align="center">
                            <asp:RadioButton ID="rbReturnBuss" runat="server" GroupName="Return" ValidationGroup="Confirm" />
                        </td>
                        <td align="center">
                            <asp:RadioButton ID="rbReturnFirst" runat="server" GroupName="Return" ValidationGroup="Confirm" />
                        </td>
                        <td align="center">
                            <asp:RadioButton ID="rbReturnClub" runat="server" GroupName="Return" ValidationGroup="Confirm" />
                        </td>
                    </tr>
                </table>
                <asp:Label ID="lblReturnStop" runat="server"></asp:Label>
                &nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="View Detail" OnCommand="LinkButton1_Command">View Detail</asp:LinkButton>
                <br />
                <asp:PlaceHolder ID="phReturnDetail" runat="server" Visible="False">
                    <div style="width: 100%">
                        <asp:DataList ID="dlReturnDetail" runat="server" HorizontalAlign="Right" Width="98%"
                            CellPadding="4" ForeColor="#333333">
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingItemStyle BackColor="White" />
                            <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <SeparatorTemplate>
                                <br />
                            </SeparatorTemplate>
                            <HeaderTemplate>
                                <table border="1" width="100%">
                                    <tr>
                                        <td align="center" class="style5">
                                            Flight ID
                                        </td>
                                        <td align="center" class="style3">
                                            From
                                        </td>
                                        <td align="center" class="style3">
                                            To
                                        </td>
                                        <td align="center" class="style3">
                                            Air Plane
                                        </td>
                                        <td align="center" class="style6">
                                            Depart Time
                                        </td>
                                        <td align="center" class="style4">
                                            Fly hour
                                        </td>
                                        <td align="center" class="style3">
                                            Allow smoking
                                        </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <ItemTemplate>
                                <table width="100%" border="1">
                                    <tr>
                                        <td align="center" class="style5">
                                            <asp:Label ID="FID" runat="server" Text='<%# Eval("FlightID") %>' />
                                        </td>
                                        <td align="center" class="style3">
                                            <asp:Label ID="lblFlightOrigin" runat="server" Text='<%# Eval("Route.Origin.Name") %>' />
                                        </td>
                                        <td align="center" class="style3">
                                            <asp:Label ID="lblFlightDes" runat="server" Text='<%# Eval("Route.Destination.Name") %>' />
                                        </td>
                                        <td align="center" class="style3">
                                            <asp:Label ID="AirPlane" runat="server" Text='<%# Eval("Plane.Name") %>' />
                                        </td>
                                        <td align="center" class="style6">
                                            <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                                            <br />
                                            <asp:Label ID="GMT" runat="server" Text='<%# Eval("Route.Origin.GMT", "(GMT {0})") %>' />
                                        </td>
                                        <td align="center" class="style4">
                                            <asp:Label ID="FlyHour" runat="server" Text='<%# Eval("FlyHour") %>' />
                                        </td>
                                        <td align="center" class="style3">
                                            <asp:RadioButton ID="RadioButton1" runat="server" Checked='<%# Eval("Smoking") %>'
                                                Text="Allow Smoking" Enabled="False" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            Available Bussiness Class Seat:
                                            <asp:Label ID="AvailBussSeatLabel0" runat="server" Text='<%# Eval("AvailBussSeat") %>' />
                                            <td colspan="2">
                                                Price per Seat:
                                                <asp:Label ID="BussPriceLabel0" runat="server" Text='<%# Eval("BussPrice") %>' />
                                            </td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            Available First Class Seat:
                                            <asp:Label ID="AvailFirstSeatLabel" runat="server" Text='<%# Eval("AvailFirstSeat") %>' />
                                            <td colspan="2">
                                                Price per Seat:
                                                <asp:Label ID="FirstPriceLabel" runat="server" Text='<%# Eval("FirstPrice","{0}USD") %>' />
                                            </td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            Available Club Class Seat:
                                            <asp:Label ID="AvailClubSeatLabel" runat="server" Text='<%# Eval("AvailClubSeat") %>' />
                                            <td colspan="2">
                                                Price per Seat:
                                                <asp:Label ID="ClubPriceLabel" runat="server" Text='<%# Eval("ClubPrice", "{0}USD") %>' />
                                            </td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">
                                            Children Discount:
                                            <asp:Label ID="ChildDiscountLabel" runat="server" Text='<%# Eval("ChildDiscount","{0}%") %>' />
                                            <td colspan="3">
                                                Senior Discount:
                                                <asp:Label ID="SeniorDiscountLabel" runat="server" Text='<%# Eval("SeniorDiscount","{0}%") %>' />
                                            </td>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
                </asp:PlaceHolder>
            </div>
        </asp:PlaceHolder>
    </div>
    <div align="center" style="margin: 20px">
        <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator"
            OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="Confirm">Please choose your seats</asp:CustomValidator>
        <br />
        <asp:Button ID="Button1" runat="server" Text="Confirm" OnClick="Button1_Click" ValidationGroup="Confirm" /><br />
        <i>You must login to buy or book ticket</i></div>
</asp:Content>
